package com.sky.controller;

import com.sky.service.CartService;
import com.sky.utils.R;
import com.sky.vo.CartItemVo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cart")
public class CartController {

    @Resource
    private CartService cartService;

    @RequestMapping("/getCartByUserId")
    public R<List<String>> getCartByUserId(@RequestParam("userId") Long userId) {
        List<String> list = cartService.getCartByUserId(userId);
        return R.ok(list);
    }
}
